package DailyPractice.Day12;

import java.util.Scanner;

/**
 * @author lumin
 * @date 2022/05/07 10:45
 **/
public class Num2 {
    public static boolean isPrime(int num){
        for(int i = 2; i <= num / 2; i++){
            if(num % i == 0){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            int i = n/2;
            while(i > 0)
            {
                if(isPrime(i) && isPrime((n-i)))
                {
                    System.out.println(i);
                    System.out.println(n-i);
                    break;
                }
                i--;
            }
        }
    }
}